from App.ext import db
from App.models import BaseModel

# letter 是拼音的首字母，所以Letter表和City表是一对多的关系
# class Letter(BaseModel):
#     letter = db.Column(db.String(1) , unique=True)
#
# class City(BaseModel):
#     letter_id = db.Column(db.Integer , db.ForeignKey(Letter.id))
#     c_id = db.Column(db.Integer , default=0)
#     c_parent_id = db.Column(db.Integer , default=0)
#     c_regionName = db.Column(db.String(16))
#     c_cityCode = db.Column(db.Integer , default=0)
#     c_pinYin = db.Column(db.String(64))

class My_City(BaseModel):
    c_letter = db.Column(db.String(1))
    c_id = db.Column(db.Integer, default=0)
    c_parent_id = db.Column(db.Integer, default=0)
    c_regionName = db.Column(db.String(16))
    c_cityCode = db.Column(db.Integer, default=0)
    c_pinYin = db.Column(db.String(64))
